
<!DOCTYPE html>
<html>
<head>
<title>登录</title>
<meta charset="UTF-8">
<meta content="text/html;charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="static/css/login.css" media="all" />
<link rel="stylesheet" type="text/css" href="static/layui/css/layui.css" media="all" />
<style type="text/css">
#form{
	display: none;
}
</style>
</head>
<body>
	<img class="video-player" height="100%" width="100%" src="static/images/banner5.jpg">
	<div class="video_mask"></div>
	<div class="login">
		<h1 class="title">OSSJK-OA</h1>
	 
		
		<div id="form" class="loginDiv">
		<form class="layui-form" >
			<div class="layui-form-item">
				<input class="layui-input" name="name" value="admin1" placeholder="用户名" lay-verify="required" type="text" autocomplete="off">
			</div>
			<div class="layui-form-item">
				<input class="layui-input" name="pwd" value="OSSJK2017" placeholder="密码" lay-verify="required" type="password" autocomplete="off">
			</div>
			<button class="layui-btn login_btn" lay-submit="" lay-filter="login">登录</button>
		</form>
		</div>
	</div>
</body>
<script type="text/javascript" src="static/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="static/layui/layui.js"></script>
<!-- <script type="text/javascript" src="static/custom/js/constant.js"></script>-->
<script type="text/javascript" src="static/custom/js/cache.js"></script> 
<script type="text/javascript" src="static/custom/js/common.js"></script>


<script type="text/javascript">
	//解决内嵌问题
	if (window != window.top) {
		window.top.location = location;
	}
	
	function refresh() {
		document.getElementById('captcha_img').src = "/captcha/getCaptcha.jpg?" + Math.random();
	}
	layui.use([ 'form', 'layer' ], function() {
		var form = layui.form;
		var layer = parent.layer === undefined ? layui.layer : parent.layer;
		var $ = layui.jquery;
		var loginApi = "login";

		loadAjax( "getAttribute", "get", null, function(response) {
			baseCallBack(response, function(response) {
				cache.attribute.set(response.data);
				var attribute = JSON.parse(cache.attribute.get());
                $(".title").html(attribute.systemname);
			});
		});

		//登录按钮事件
		form.on("submit(login)", function(data) {
			loadAjax( loginApi, "post", data.field, function(response) {
				baseCallBack(response, function(response) {
					cache.token.set(response.data);
					location.href = "./"
				});
			});
			return false;
		})
		
		 
		  $("#form").show();
	});
</script>
</html>